package com.xyzq.cgate.common.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author chenchen
 * @since 2019-06-06
 */
public class Plugin extends Model<Plugin> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.INPUT)
    private String id;
    /**
     * 插件名称
     */
    private String name;
    /**
     * 插件角色
     */
    private Integer role;
    /**
     * 是否开启（0，未开启，1开启）
     */
    private Integer enabled;
    /**
     * 创建时间
     */
    @TableField("date_created")
    private Date dateCreated;
    /**
     * 更新时间
     */
    @TableField("date_updated")
    private Date dateUpdated;

    @TableField(exist = false)
    private String roleContent;

    @TableField(exist = false)
    private boolean enabledContent;

    public String getRoleContent() {
        return roleContent;
    }

    public boolean isEnabledContent() {
        return enabledContent;
    }

    public void setEnabledContent(boolean enabledContent) {
        this.enabledContent = enabledContent;
    }

    public void setRoleContent(String roleContent) {
        this.roleContent = roleContent;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Date getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }

    public Date getDateUpdated() {
        return dateUpdated;
    }

    public void setDateUpdated(Date dateUpdated) {
        this.dateUpdated = dateUpdated;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Plugin{" +
        ", id=" + id +
        ", name=" + name +
        ", role=" + role +
        ", enabled=" + enabled +
        ", dateCreated=" + dateCreated +
        ", dateUpdated=" + dateUpdated +
        "}";
    }
}
